switch: Fix int/double comparison
authorTimm Bäder <mail@baedert.org>
Thu, 5 Oct 2017 08:16:18 +0000 (10:16 +0200)
committerTimm Bäder <mail@baedert.org>
Thu, 5 Oct 2017 08:21:54 +0000 (10:21 +0200)
We get a double coordinate.

gtk/gtkswitch.c

index 91fc344ddb00246575fa33e96faaff024879fbb1..659e9edb80345fe5a3ae6ca8d9e4559bbde4994f 100644 (file)
@@ -192,8 +192,8 @@ gtk_switch_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
   /* If the press didn't happen in the draggable handle,
    * cancel the pan gesture right away
    */
-  if ((priv->is_active && x <= allocation.width / 2) ||
-      (!priv->is_active && x > allocation.width / 2))
+  if ((priv->is_active && x <= allocation.width / 2.0) ||
+      (!priv->is_active && x > allocation.width / 2.0))
     gtk_gesture_set_state (priv->pan_gesture, GTK_EVENT_SEQUENCE_DENIED);
 }